package com.mypkg.beans;

import java.util.ArrayList;

import com.mypkg.controls.BasicControl;

public class DivBean {
	private String value;
	private String idDiv;
	private String someAttribs;
	
	public String getSomeAttribs() {
		return someAttribs;
	}
	public void setSomeAttribs(String someAttribs) {
		this.someAttribs = someAttribs;
	}
	public String getIdDiv() {
		return idDiv;
	}
	public void setIdDiv(String idDiv) {
		this.idDiv = idDiv;
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	
	public String render()
	{
		String result;
		ArrayList<String> atribDiv = new ArrayList<String>();
		atribDiv.add("id='"+this.idDiv+"'");
		if (this.someAttribs != null)
			atribDiv.add(someAttribs);
		BasicControl bc = new BasicControl();
		bc.setControlType("div");
		bc.setAttributesForControl(atribDiv);
		bc.setContentTag(this.value);
		bc.setHasCloseTag(true);	
		result = bc.renderFunction();
		return result;
	}

}
